<?php /* Smarty version Smarty-3.0.9, created on 2013-05-28 21:54:40
         compiled from "D:/wamp/www/glight/templates\orden_de_produccion.tpl" */ ?>
<?php /*%%SmartyHeaderCode:3100751a527a0602cd2-38414676%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '32331cab07b83bb2650c474abf5edeb47516f368' => 
    array (
      0 => 'D:/wamp/www/glight/templates\\orden_de_produccion.tpl',
      1 => 1369778023,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '3100751a527a0602cd2-38414676',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>

<div><h3 align=center >Crear Orden de Produccion-Harley Davidson</h3></div>
<table  cellspacing="10" cellpadding="1" border="4"> 
    
    <tr> 
    <td align="center" valign="top" WIDTH="50%" 
	    HEIGHT="150">
        <h4 > Informacion de la orden</h4><br>
        
        <p align="left">
            Codigo Guia:  <input  name=orden_produccion value="<?php echo $_smarty_tpl->getVariable('orden')->value[0]->get('codigo')+1;?>
" readonly><br><br>
        Fecha:          <input  name=fecha value="<?php echo $_smarty_tpl->getVariable('fecha')->value;?>
" readonly>

        </p>

        
  
    </td>
    
        
    <td align="left"  valign="top" >
              <form  method="post" action="<?php echo $_smarty_tpl->getVariable('gvar')->value['l_global'];?>
orden_de_produccion.php?option=agregar_detalle">
                  <h4 align=center> Detalles</h4><br>
                
                  Cantidad: <input type="number" required id="cantidad" name="cantidad" min= 1 autocomplete="on">
                <br><br>
               <input type="hidden" value="<?php echo $_smarty_tpl->getVariable('orden')->value[0]->get('codigo')+1;?>
" name="orden_produccion">

                
                  Modelo: 
                <select name="modelo">
                         <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['i']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'] = is_array($_loop=$_smarty_tpl->getVariable('modelo')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['name'] = 'i';
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total']);
?>
          <option <?php if (isset($_smarty_tpl->getVariable('object',null,true,false)->value->modelo)){?>selected<?php }?> title="<?php echo $_smarty_tpl->getVariable('modelo')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('nombre');?>
" value="<?php echo $_smarty_tpl->getVariable('modelo')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('codigo');?>
"><?php echo $_smarty_tpl->getVariable('modelo')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('nombre');?>
</option> 
      <?php endfor; endif; ?>
                </select>
                
                <p align="right">
         <input name="agregar_detalle" type="submit" value="Agregar Detalle">
                </p>
         
        </form>
 
    </td>  
    <tr>
        <td valign=top colspan="2" 
	    HEIGHT="300">
            <h4 > Lista de detalles</h4><br>
         <?php if (sizeof($_smarty_tpl->getVariable('detalles')->value)>0){?>   
      <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['i']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'] = is_array($_loop=$_smarty_tpl->getVariable('detalles')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['name'] = 'i';
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total']);
?>
          <?php $_smarty_tpl->tpl_vars['a'] = new Smarty_variable(unserialize($_smarty_tpl->getVariable('detalles')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]), null, null);?>
          <?php echo $_smarty_tpl->getVariable('a')->value->get('cantidad');?>
---Motos---<?php echo $_smarty_tpl->getVariable('a')->value->get('modelo');?>
<br>
          
      <?php endfor; endif; ?>   
          <?php }?>  
        </td>
    </tr>
    <tr>
        <td colspan=2 align=center>
        <form  method="post" action="<?php echo $_smarty_tpl->getVariable('gvar')->value['l_global'];?>
orden_de_produccion.php?option=guardar">
                        <input type="hidden" value="<?php echo $_smarty_tpl->getVariable('orden')->value[0]->get('codigo')+1;?>
" name="codigo">
                        <input type="hidden" value="<?php echo $_smarty_tpl->getVariable('fecha')->value;?>
" name="fecha">

            
                     <input name="guardar" type="submit" value="Guardar">

        </form>
<form  method="post" action="<?php echo $_smarty_tpl->getVariable('gvar')->value['l_global'];?>
orden_de_produccion.php?option=cancelar">
                        
            
                     <input name="cancelar" type="submit" value="Calcelar">

        </form>
        </td>
    
    </tr>

</table>
     